#include <iostream>
using namespace std;

/* 指针理解示例 */
int main() {
	int num = 1;
	cout << "int num = 1;" << endl;
	printf("num: address[%p] -> value[%d]\n\n", &num, num);

	int* ptr = &num;
	cout << "int* ptr = &num;" << endl;
	printf("ptr: address[%p] -> value[%p]\n\n", &ptr, ptr);

	cout << "*ptr is : " << *ptr << endl;
	printf("*ptr mean get ptr's value([%p]) to be address, and find the value by this address is [%d]\n\n", ptr, *ptr);

	cout << "& use to get parm's address." << endl;

	return 0;
}